package com.letfox.user.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.letfox.user.dao.RoleDao;
import com.letfox.user.model.URole;
import com.letfox.user.service.RoleService;

@Service
public class RoleServiceImpl implements RoleService {

	@Autowired
	private RoleDao roleDao;

	@Override
	public int save(URole role) {
		return roleDao.insert(role);
	}

	@Override
	public int update(URole role) {
		return roleDao.update(role);
	}

	@Override
	public int deleteById(Long id) {
		return roleDao.deleteById(id);
	}

	@Override
	public int deleteByIds(String ids) {
		return roleDao.deleteByIds(ids);
	}

	@Override
	public URole getById(Long id) {
		return roleDao.selectById(id);
	}

	@Override
	public List<URole> getList(URole role) {
		return roleDao.selectList(role);
	}

}
